package com.kerbores.wx.session;

import com.kerbores.wx.api.WxSession;
import com.kerbores.wx.api.WxSessionManager;
import com.kerbores.wx.bean.WxInMsg;

public abstract class AbstractWxSessionManager implements WxSessionManager {

	@Override
	public WxSession getSession(String id) {
		return getSession(id, true);
	}

	@Override
	public WxSession getSession(WxInMsg msg) {
		return getSession(msg, true);
	}

	@Override
	public WxSession getSession(WxInMsg msg, boolean create) {
		return getSession(msg.getFromUserName(), create);
	}

}
